Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix TmdbSeasonDetail images parsing #117

Merged

Conversation

DrewCarlson
Copy link
Contributor

@DrewCarlson DrewCarlson commented Nov 16, 2023

Right now, response parsing can fail for tv season details with images as it expects the images to be within a nested result list but the API provides a top level block roughly matching the TmdbImages class. Added a test to validate the failure and fix.

HttpClient: RESPONSE https://api.themoviedb.org/3/tv/63333/season/1?append_to_response=release_dates%2Cimages%2Ccredits%2Ctv_credits%2Cexternal_ids&include_image_language=
failed with exception: io.ktor.serialization.JsonConvertException: Field 'results' is required for type with serial name 'app.moviebase.tmdb.model.TmdbResult', but it was missing at path: $.images

It currently expects the images to be within a nested `result` list but the API provides a top level block roughly matching the TmdbImages class.
@ChrisKruegerDev
Copy link
Owner

Nice, thanks! Interesting to you that it's different from the other append to response objects now.

@ChrisKruegerDev ChrisKruegerDev merged commit 6d23372 into ChrisKruegerDev:main Nov 18, 2023
2 checks passed
@DrewCarlson DrewCarlson deleted the drew/fix-season-details branch November 19, 2023 06:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants